import request from '@/utils/axiosRequest'

const select = (x) => {
    return request({
        url: '/menu/select?index=' + x.index + '&size=' + x.size
    })
}

const add = (data) => {
    return request({
        url: '/menu/add',
        data: data,
        method: 'post'
    })
}

const update = (data) => {
    return request({
        url: '/menu/update',
        data: data,
        method: 'post'
    })
}
const del = (id) => {
    return request({
        url: '/menu/delete?id=' + id,
        method: 'delete'
    })
}

export default {
    select, add, update, del
}